/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package generadorva;

import ec.util.MersenneTwisterFast;
import java.text.NumberFormat;

/**
 *
 * @author USUARIO
 */
public class ModeloVendedorPeriodico {
    
    public static void main(String[] args) {
        BoxMuller demanda = new BoxMuller(500,10);
        double costoUnidad = 80500;
        double costoFaltante = 100000;
        double costoSobrante = 2500;
        Costo costo = new Costo(demanda, costoUnidad, costoFaltante, costoSobrante);
        MersenneTwisterFast prng = new MersenneTwisterFast(3254785);
        int n = 1000;
        double sumaCosto = 0;
        for (int i = 0; i < n; i++) {
            sumaCosto += costo.calcularCosto(400, prng);
        }
        NumberFormat fr = NumberFormat.getCurrencyInstance();
        System.out.println("costo promedio: " + fr.format(sumaCosto/n) );
        
    }
    
}
